package com.jeesite.modules.utils.tupian;

import com.jeesite.common.lang.StringUtils;

public class PicUtil {

    public static String zhuanbianPic(String avatarUrl,String baseUrl) {
        if(StringUtils.isNotEmpty(avatarUrl)){
            if(avatarUrl.indexOf("http://testbbjz.zzlmvip.com:8880")!=-1){
                return avatarUrl.replaceAll("http://testbbjz.zzlmvip.com:8880",baseUrl);
            }
        }

        if(StringUtils.isNotEmpty(avatarUrl) && !avatarUrl.startsWith("http")){
            return baseUrl+avatarUrl;
        }
        return avatarUrl;
    }
}
